<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="../layui/jquery-3.2.1.min.js"></script>
    <script src="../layui/layui.js"></script>
    <link href="../layui/css/layui.css" rel="stylesheet">
    <script src="js/stock.js"></script>
    <link href="css/stock.css"  rel="stylesheet">
</head>
<body>
<h1 style="margin-left: 45%" >库存一览</h1>

<!--库存信息列表-->
<div>
    <table class="layui-table">
        <thead><tr><th>商品名称</th><th>类别</th><th>厂家</th><th>库存数量</th><th>操作</th></tr></thead>
        <tbody id="stockData">
        </tbody>
    </table>
    <div id="cutPageDiv"></div>
</div>


<!--查询库存信息-->
<div id="select">
    <div id="info">查询库存信息</div>
    <div style="width: 280px;height: 200px; ">
        <form  class="layui-form" action="">
            <div class="layui-form-item">
                <label class="layui-form-label">商品名称</label>
                <div class="layui-input-block">
                    <input type="text" name="name" id="name" required  lay-verify="required" placeholder="请输入商品名称" autocomplete="off" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">起始数量</label>
                <div class="layui-input-block">
                    <input type="text" name="startNum" id="startNum" required  lay-verify="required" placeholder="请输入起始数量" autocomplete="off" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">类别</label>
                <div class="layui-input-block">
                    <select name="type" id="type" lay-verify="required">
                        <option>电脑产品</option>
                        <option>手机产品</option>
                        <option>其他数码产品</option>
                        <option>其他</option>
                    </select>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">结束数量</label>
                <div class="layui-input-block">
                    <input type="text" name="endNum" id="endNum" required  lay-verify="required" placeholder="请输入结束数量" autocomplete="off" class="layui-input">
                </div>
            </div>
            <a href="javascript:find(1)" class="layui-btn layui-btn-normal"style="margin-top: 5px;margin-left: 35px">
                <i class="layui-icon layui-icon-search" ></i>查询
            </a>
        </form>
    </div>
</div>

    <!--商品详细信息弹出层-->
    <div id="productInfoDiv" style="display: none">
        <h1 style="margin-left: 35%" >商品信息详情</h1>

        <form class="baseInfo" >
            <div style="display: flex">
             <div style="width: 300px;">
                 <div class="base"><span class="layui-text">商品编号：</span><span class="value" id="proId"></span></div>
                 <div class="base"><span class="layui-text" >商品名称：</span><span class="value" id="proName"></span></div>
                 <div class="base"><span class="layui-text">厂家：</span><span class="value" id="proVender"></span></div>
                 <div class="base"><span class="layui-text">类别：</span><span class="value" id="proType"></span></div>
                 <div class="base"><span class="layui-text">建议采购价：</span><span class="value" id="buyPrice"></span></div>
             </div>
                <div style="width: 300px;margin-left: 20px">
                    <div><img id="picture"  src="../img/start.jpg" style="margin-top: 30px;width: 100px;height: 100px;"></div>
                    <div class="base" style="margin-top: 22px"><span class="layui-text" >库存数量：</span><span class="value" id="storeNum"></span></div>
                    <div class="base"><span class="layui-text" style="margin-top: 20px">建议销售价：</span><span class="value" id="sellPrice"></span></div>
                    <div style="margin-left:-300px"><input type="button" style="margin-left: 215px;margin-top: 30px" class="layui-btn layui-btn-lg" value="确定" onclick="layer.closeAll()"></div>
                </div>

            </div>
        </form>
    </div>

    <!--修改商品销售价格弹出层-->
    <div id="updatePriceDiv" style="display: none">
        <h1 style="margin-left: 37%" >修改商品销售价</h1>

        <form class="baseInfo">
            <div style="display: flex">
                <div style="width: 300px;">
                    <div class="base"><span class="layui-text">商品编号：</span><span class="value" id="proId1"></span></div>
                    <div class="base"><span class="layui-text">商品名称：</span><span class="value" id="proName1"></span></div>
                    <div class="base"><span class="layui-text">厂家：</span><span class="value" id="proVender1"></span></div>
                    <div class="base"><span class="layui-text">类别：</span><span class="value"  id="proType1"></span></div>
                    <div class="base"><span class="layui-text">建议采购价：</span><span class="value" id="buyPrice1"></span></div>
                </div>
                <div style="width: 300px;margin-left: 20px">
                    <div><img id="picture1"  src="../img/start.jpg" style="margin-top: 30px;width: 100px;height: 100px;"></div>
                    <div style="margin-top: 22px"><span  class="layui-text" >库存数量：</span><span id="storeNum1" class="value"></span></div>
                    <div  style="margin-top: 20px"><span class="layui-text">建议销售价：</span><input type="text" id="updatePrice" style="width: 100px" ></div>
                    <div style="margin-left:-300px"><a  class="layui-btn layui-btn-warm" style="margin-left: 215px;margin-top: 30px" href="javascript:updatePrice()">修改</a></div>
                </div>
            </div>
        </form>
    </div>

</body>
</html>